package com.lowca.news.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.lowca.news.dao.ArticleDao;
import com.lowca.news.dao.support.Pager;
import com.lowca.news.entity.Article;
import com.lowca.news.service.ArticleService;
import com.lowca.news.web.formbean.AdminArticleConditionForm;

@Service("articleService")
public class ArticleServiceImpl implements ArticleService {

	@Resource
	private ArticleDao articleDao;

	@Override
	public void addArticle(Article article) {
		articleDao.save(article);
	}

	@Override
	public void updateArticle(Article article) {
		articleDao.update(article);
	}

	@Override
	public Pager<Article> searchArticle(AdminArticleConditionForm condition,
			int pageNo, int pageSize) {
		return articleDao.searchArticle(condition, pageNo, pageSize);
	}

}
